package com.ruoyi.evaluate.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ruoyi.evaluate.mapper.EvaluateProjectMapper;
import com.ruoyi.base.domain.BaseClass;
import com.ruoyi.base.mapper.BaseClassMapper;
import com.ruoyi.evaluate.domain.EvaluateProject;
import com.ruoyi.evaluate.service.IEvaluateProjectService;

/**
 * 评价项目Service业务层处理
 * 
 * @author yepanpan
 * @date 2020-11-09
 */
@Service
public class EvaluateProjectServiceImpl implements IEvaluateProjectService 
{
    @Autowired
    private EvaluateProjectMapper evaluateProjectMapper;

    @Autowired
    private BaseClassMapper baseClassMapper;

    /**
     * 查询评价项目
     * 
     * @param id 评价项目ID
     * @return 评价项目
     */
    @Override
    public EvaluateProject selectEvaluateProjectById(Long id)
    {
        return evaluateProjectMapper.selectEvaluateProjectById(id);
    }

    /**
     * 查询评价项目列表
     * 
     * @param evaluateProject 评价项目
     * @return 评价项目
     */
    @Override
    public List<EvaluateProject> selectEvaluateProjectList(EvaluateProject evaluateProject)
    {
        return evaluateProjectMapper.selectEvaluateProjectList(evaluateProject);
    }

    /**
     * 新增评价项目
     * 
     * @param evaluateProject 评价项目
     * @return 结果
     */
    @Override
    @Transactional
    public int insertEvaluateProject(EvaluateProject evaluateProject)
    {
		return evaluateProjectMapper.insertEvaluateProject(evaluateProject);
    }

    /**
     * 修改评价项目
     * 
     * @param evaluateProject 评价项目
     * @return 结果
     */
    @Override
    public int updateEvaluateProject(EvaluateProject evaluateProject)
    {
        return evaluateProjectMapper.updateEvaluateProject(evaluateProject);
    }

    /**
     * 批量删除评价项目
     * 
     * @param ids 需要删除的评价项目ID
     * @return 结果
     */
    @Override
    public int deleteEvaluateProjectByIds(Long[] ids)
    {
        return evaluateProjectMapper.deleteEvaluateProjectByIds(ids);
    }

    /**
     * 删除评价项目信息
     * 
     * @param id 评价项目ID
     * @return 结果
     */
    @Override
    public int deleteEvaluateProjectById(Long id)
    {
        return evaluateProjectMapper.deleteEvaluateProjectById(id);
    }
}
